html {
  font-size: 10px;
}

body {
  font-size: 14px;
}

* {
  box-sizing: border-box;
}
.m-t{
  margin-top: 1.2rem;
}
/* 设置 notification、message 层级在 loading 之上 */
.el-message,
.el-notification {
  z-index: 2070 !important;
}

/* el-alert */
.el-alert {
  border: 1px solid;
}

/* 当前页面最大化 css */
.main-maximize {

  .aside-split,
  .el-aside,
  .el-header,
  .el-footer,
  .tabs-box {
    display: none !important;
  }
}

/* mask image */
.mask-image {
  padding-right: 5rem;
  mask-image: linear-gradient(90deg, #000000 0%, #000000 calc(100% - 5rem), transparent);
}

/* custom card */
.card {
  box-sizing: border-box;
  padding: 2rem;
  overflow-x: hidden;
  background-color: var(--el-bg-color);

  // border: 1px solid var(--el-border-color-light);

  // border-radius: 6px;
  // box-shadow: 0 0 12px rgb(0 0 0 / 5%);
}

/* ProTable 不需要 card 样式（在组件内使用 ProTable 会使用到） */
.no-card {
  .card {
    padding: 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .table-search {
    padding: 1.8rem 0 0 !important;
    margin-bottom: 0 !important;
  }
}

/* content-box (常用内容盒子) */
.content-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;

  .text {
    margin: 2rem 0 3rem;
    font-size: 2.3rem;
    font-weight: bold;
    color: var(--el-text-color-regular);
  }

  .el-descriptions {
    width: 100%;
    padding: 4rem 0 0;

    .el-descriptions__title {
      font-size: 1.8rem;
    }

    .el-descriptions__label {
      width: 20rem;
    }
  }
}

/* main-box (树形表格 treeFilter 页面会使用，左右布局 flex) */
.main-box {
  display: flex;
  width: 100%;
  height: 100%;

  .table-box {
    // 这里减去的 230px 是 treeFilter 组件宽度
    width: calc(100% - 23rem);
  }
}

/* proTable */
.table-box,
.table-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  height: 100%;
  border-radius: 6px;

  // table-search 表格搜索样式
  .table-search {
    padding: 1.8rem 1.8rem 0;
    border-radius: 6px 6px 0 0;

    // margin-bottom: 10px;
    .el-form {
      .el-form-item__content>* {
        width: 100%;
      }

      // 去除时间选择器上下 padding
      .el-range-editor.el-input__wrapper {
        padding: 0 1rem;
      }
    }

    .operation {
      display: flex;
      align-items: center;
      // justify-content: flex-end;
      margin-bottom: 1.8rem;
    }

    /* 修改element的表单布局 */
    // .el-form-item__label {
    //   min-width: 7.1rem;
    //   padding: 0;
    // }
    .el-form-item--default,
    .el-form-item {
      margin-bottom: 1.2rem;
    }
  }

  .table-search+.table-main {
    padding-top: 0;
    border-radius: 0% 0% 6px 6px;
  }

  .hidden {
    display: none;
  }

  .hidden+.table-main {
    padding-top: 2rem;
  }

  // 表格 header 样式
  .table-header {
    .header-button-lf {
      float: left;
    }

    .header-button-ri {
      float: right;
    }

    .el-button {
      margin-bottom: 1.5rem;
    }
  }

  // el-table 表格样式
  .el-table {
    flex: 1;

    // 修复 safari 浏览器表格错位 https://github.com/HalseySpicy/Geeker-Admin/issues/83
    table {
      width: 100%;
    }

    .el-table__header th {
      height: 4.5rem;
      font-size: 1.5rem;
      font-weight: bold;
      color: var(--el-text-color-primary);
      background: var(--el-fill-color-light);
    }

    .el-table__row {
      height: 4.5rem;
      font-size: 1.4rem;

      .move {
        cursor: move;

        .el-icon {
          cursor: move;
        }
      }
    }

    // 设置 el-table 中 header 文字不换行，并省略
    .el-table__header .el-table__cell>.cell {
      // white-space: nowrap;
      white-space: wrap;
    }

    // 解决表格数据为空时样式不居中问题(仅在element-plus中)
    .el-table__empty-block {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);

      .table-empty {
        line-height: 3rem;
      }
    }

    // table 中 image 图片样式
    .table-image {
      width: 5rem;
      height: 5rem;
      border-radius: 50%;
    }
  }

  // 表格 pagination 样式
  .el-pagination {
    display: flex;
    justify-content: flex-end;
    margin-top: 2rem;
  }
}

/* el-table 组件大小 */
.el-table--small {
  .el-table__header th {
    height: 4rem !important;
    font-size: 1.4rem !important;
  }

  .el-table__row {
    height: 4rem !important;
    font-size: 1.3rem !important;
  }
}

.el-table--large {
  .el-table__header th {
    height: 5rem !important;
    font-size: 1.6rem !important;
  }

  .el-table__row {
    height: 5rem !important;
    font-size: 1.5rem !important;
  }
}

/* el-drawer */
.el-drawer {
  .el-drawer__header {
    padding: 1.6rem 2rem;
    margin-bottom: 0;
    border-bottom: 1px solid var(--el-border-color-lighter);

    span {
      font-size: 1.7rem;
      line-height: 1.7rem;
      color: var(--el-text-color-primary) !important;
    }
  }

  .el-drawer__footer {
    border-top: 1px solid var(--el-border-color-lighter);
  }

  // select 样式
  .el-select {
    width: 100%;
  }

  // drawer-form 中存在两列 form-item 样式
  .drawer-multiColumn-form {
    display: flex;
    flex-wrap: wrap;

    .el-form-item {
      width: 47%;

      &:nth-child(2n-1) {
        margin-right: 5%;
      }
    }
  }
}

/* el-dialog */
.el-dialog {
  padding: 0;

  .el-dialog__header {
    padding: 0.6rem 1.2rem;
    margin: 0;
    border-bottom: 1px solid var(--el-border-color-lighter);

    .el-dialog__title {
      font-size: 1.4rem;
    }
  }

  .el-dialog__body,
  .el-dialog__footer {
    padding: 1.2rem;
  }
  .el-dialog__body{
    background-color: var(--el-bg-color-page);
    .container{
      max-height: 60vh;
      overflow: auto;
    }
  }
}

.el-dialog__headerbtn {
  width: 3.6rem;
  height: 4rem;
}

/* el-button-group按钮样式 */
.el-button-group {

  .el-button:first-child,
  >.el-button:first-child:last-child {
    border-right: none;
  }

  .el-button--default:not(:first-child, :last-child) {
    border: var(--el-border);
  }

  .el-button--primary:not(:first-child, :last-child),
  .el-button--success:not(:first-child, :last-child),
  .el-button--info:not(:first-child, :last-child),
  .el-button--warning:not(:first-child, :last-child),
  .el-button--danger:not(:first-child, :last-child) {
    border-top: none;
    border-bottom: none;
  }

  >.el-button--default:last-child {
    // border: var(--el-border);
  }

  >.el-button--primary:last-child,
  >.el-button--success:last-child,
  >.el-button--info:last-child,
  >.el-button--warning:last-child,
  >.el-button--danger:last-child {
    border-top: none;
    border-bottom: none;
    border-right: none;
  }
}

// 栅格
.container {
  padding: 1.2rem;
  background-color: var(--el-bg-color);
  border-radius: 0.6rem;
}

.jz-row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -1.2rem;
  margin-right: -1.2rem;

  .jz-col-sm-1 {
    max-width: 4.1666666666%;
    flex: 0 0 4.1666666666%;
  }

  .jz-col-sm-2 {
    max-width: 8.3333333333%;
    flex: 0 0 8.3333333333%;
  }

  .jz-col-sm-3 {
    max-width: 12.5%;
    flex: 0 0 12.5%;
  }

  .jz-col-sm-4 {
    max-width: 16.666666666%;
    flex: 0 0 16.666666666%;
  }

  .jz-col-sm-5 {
    max-width: 20.833333333%;
    flex: 0 0 20.833333333%;
  }

  .jz-col-sm-6 {
    max-width: 25%;
    flex: 0 0 25%;
  }

  .jz-col-sm-7 {
    max-width: 29.166666666%;
    flex: 0 0 29.166666666%;
  }

  .jz-col-sm-8 {
    max-width: 33.333333333%;
    flex: 0 0 33.333333333%;
  }

  .jz-col-sm-9 {
    max-width: 37.5%;
    flex: 0 0 37.5%;
  }

  .jz-col-sm-10 {
    max-width: 41.6666666666%;
    flex: 0 0 41.6666666666%;
  }

  .jz-col-sm-11 {
    max-width: 45.8333333333%;
    flex: 0 0 45.8333333333%;
  }

  .jz-col-sm-12 {
    max-width: 50%;
    flex: 0 0 50%;
  }

  .jz-col-sm-13 {
    max-width: 54.1666666666%;
    flex: 0 0 54.1666666666%;
  }

  .jz-col-sm-14 {
    max-width: 58.3333333333%;
    flex: 0 0 58.3333333333%;
  }

  .jz-col-sm-15 {
    max-width: 62.5%;
    flex: 0 0 62.5%;
  }

  .jz-col-sm-16 {
    max-width: 66.6666666666%;
    flex: 0 0 66.6666666666%;
  }

  .jz-col-sm-17 {
    max-width: 70.8333333333%;
    flex: 0 0 70.8333333333%;
  }

  .jz-col-sm-18 {
    max-width: 75%;
    flex: 0 0 75%;
  }

  .jz-col-sm-19 {
    max-width: 79.1666666666%;
    flex: 0 0 79.1666666666%;
  }

  .jz-col-sm-20 {
    max-width: 83.3333333333%;
    flex: 0 0 83.3333333333%;
  }

  .jz-col-sm-21 {
    max-width: 87.5;
    flex: 0 0 87.5%;
  }

  .jz-col-sm-22 {
    max-width: 91.6666666666%;
    flex: 0 0 91.6666666666%;
  }

  .jz-col-sm-23 {
    max-width: 95.8333333333%;
    flex: 0 0 95.8333333333%;
  }

  .jz-col-sm-24 {
    max-width: 100%;
    flex: 0 0 100%;
  }

  [class*=jz-col] {
    padding-left: 1.2rem;
    padding-right: 1.2rem;
    .el-cascader{
      width: 100%;
    }
  }
}

.el-form-item__label {
  padding: 0;
}

.el-form-item--default {
  margin-bottom: 1.2rem;
  --font-size: 1.4rem;
  --el-form-label-font-size: var(--font-size);
}

.el-form-item__error {
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  background-color: var(--el-color-danger);
  color: #fff;
  z-index: 2;
  margin-top: 0.4rem;
  line-height: 100%;
}

.el-form-item__error::before {
  position: absolute;
  top: -0.8rem;
  left: 0.8rem;
  content: "";
  border-width: 0.4rem;
  border-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) var(--el-color-danger) rgba(0, 0, 0, 0);
  border-style: solid;
}
.ibox {
  clear: both;
  padding-bottom: var(--el-font-size-extra-small)
}

.ibox :after,.ibox :before {
  display: table
}

.ibox-title {
  background-color: #fff;
  color: inherit;
  margin-bottom: 0;
  line-height: 4rem;
  padding: 0 var(--el-font-size-extra-small);
  border-radius: .6rem .6rem 0 0;
  font-size: var(--el-font-size-base)
}

.ibox-title :after {
  content: "";
  display: table;
  clear: both
}

.ibox-title h5 {
  font-size: var(--el-font-size-base);
  margin: 0;
  padding: 0;
  font-weight: 400;
  text-overflow: ellipsis;
  border-bottom: 1px solid var(--el-bg-color-page)
}

.ibox-content {
  background-color: #fff;
  color: inherit;
  padding: var(--el-font-size-extra-small);
  position: relative;
  border-radius: .6rem
}

.ibox-title+.ibox-content:before {
  content: "";
  position: absolute;
  top: -.05rem;
  left: 1.5rem;
  right: 1.5rem;
  height: .1rem;
  background-color: #e7eaec
}

.ibox-title+.ibox-content {
  border-radius: 0 0 .6rem .6rem
}
